[Crypto] Reduce dependencies of crypto#29646
Open
siemen11 wants to merge 3 commits intolowRISC:earlgrey_1.0.0from
Open
[Crypto] Reduce dependencies of crypto#29646siemen11 wants to merge 3 commits intolowRISC:earlgrey_1.0.0from
siemen11 wants to merge 3 commits intolowRISC:earlgrey_1.0.0from
Conversation
Remove the runtime dependencies from the cryptolib. Signed-off-by: Siemen Dhooghe <sdhooghe@google.com>
Remove the dependency of silicon creator files in the cryptolib. Signed-off-by: Siemen Dhooghe <sdhooghe@google.com>
Remove the dependency of lib/arch by gating otcrypto_security_config_check via OPENTITAN_IS_EARLGREY. Signed-off-by: Siemen Dhooghe <sdhooghe@google.com>
Comment on lines
+24
to
+34
| // Check if the dummy instructions and the data independent timing is | ||
| // enabled in ibex. | ||
| hardened_bool_t ibex_secure_config = ibex_check_security_config(); | ||
| if (launder32(ibex_secure_config) == kHardenedBoolFalse) { | ||
| return OTCRYPTO_FATAL_ERR; | ||
| } | ||
| HARDENED_CHECK_EQ(ibex_secure_config, kHardenedBoolTrue); | ||
| } | ||
| else { | ||
| // Do not check the device config when security level is low. | ||
| HARDENED_CHECK_EQ(security_level, kOtcryptoKeySecurityLevelLow); |
Contributor
There was a problem hiding this comment.
Why did you move this chunk into the macro #IF?
Contributor
Author
There was a problem hiding this comment.
I wanted to take over the role of kDeviceType == kDeviceSilicon
andrea-caforio
approved these changes
Apr 1, 2026
Contributor
andrea-caforio
left a comment
There was a problem hiding this comment.
Thanks @siemen11.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To remove unused functions in the cryptolib tar, we reduce the dependencies of the cryptolib to make the library more standalone